<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8" />
  <link rel="icon" href="/favicon.ico" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="pragma" content="no-cache" />
  <!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet"> -->
  <title>5MWh风光柴储充能源管理系统</title>
</head>
<style>
  body {
    /* font-family: '宋体'!important; */
    background: #1a356a !important;
  }

  .self_app {
    /* overflow: hidden; */
  }

  body .ant-select-dropdown.dropss {
    background-color: #0C214A !important;
    color: #fff !important;
  }

  body .ant-select-dropdown.dropss .ant-select-item.ant-select-item-option {
    color: #fff;
    background-color: #0C214A;
  }

  body .ant-select-dropdown.dropss .ant-select-item.ant-select-item-option.ant-select-item-option-active.ant-select-item-option-selected {
    color: #fff;
    background-color: #6c8fd3;
  }


  
  body .ant-select-dropdown.dropss .ant-select-item.ant-select-item-option.ant-select-item-option-selected {
    color: #fff;
    background-color: #6c8fd3;
  }



  body .ant-select-dropdown.dropss_inner {
    background-color: #0C214A !important;
    color: #fff !important;
  }

  body .ant-select-dropdown.dropss_inner .ant-select-item.ant-select-item-option {
    color: #fff;
    background-color: #0C214A;
  }

  body .ant-select-dropdown.dropss_inner .ant-select-item.ant-select-item-option.ant-select-item-option-selected {
    color: #fff;
    background-color: #6c8fd3;
  }

  body .ant-select-dropdown.dropss_inner .ant-select-item.ant-select-item-option.ant-select-item-option-active.ant-select-item-option-selected {
    color: #fff;
    background-color: #6c8fd3;
  }
</style>

<body>
  <div id="app" class="self_app"></div>
  <script type="module" src="/src/main.js" id="script_ele"></script>
</body>

</html>

<script>
  // let des_s="liuhf_add 2023-12-28 before";

  // function set_scale(zoom) {
  //   document.body.style.zoom = zoom;
  //   console.log("zoom", zoom)
  // }

  // //缩放包括系统缩放和浏览器缩放。
  // function check_scale() {
  //   let scaled = window.devicePixelRatio;
  //   console.log("window.devicePixelRatio", window.devicePixelRatio)

  //   if (scaled == 1.25) {
  //     set_scale(0.75);
  //   } else if (scaled == 1.5) {
  //     set_scale(0.8)
  //   }

  // }

  // window.addEventListener("resize", function () {
  //   check_scale();
  // }, false)

  // // 1920*1080  scale*1
  // // 2060*1440  scale*
  // window.onload = function () {

  //   check_scale()
  // }
</script>

<script>
  /**
   * @description: 等比例放大
   * @return {*}
   */
  function bodyScale() {
    var devicewidth = document.documentElement.clientWidth;
    var scale = devicewidth / 2000; // 分母——设计稿的尺寸宽度
    // document.body.style.zoom = scale-0.07113;
    //页面尺寸放大
    document.body.style.zoom = scale;
    //解决zoom放大缩小导致echarts位置偏移问题
    let strScale = `scale(${scale})`;
    var obj = {
      zoom: 1 / scale,
      transform: strScale,
      transformOrigin: "0 0",
    };

    insertCss("canvas", obj);
  }

  function insertCss(select, styles) {
    // console.log(styles);
    if (document.styleSheets.length === 0) {
      //如果没有style标签,则创建一个style标签
      var style = document.createElement("style");
      document.head.appendChild(style);
    }
    var styleSheet = document.styleSheets[document.styleSheets.length - 1]; //如果有style 标签.则插入到最后一个style标签中
    var str = select + " {"; //插入的内容必须是字符串,所以得把obj转化为字符串
    for (var prop in styles) {
      str +=
        prop.replace(/([A-Z])/g, function (item) {
          //使用正则把大写字母替换成 '-小写字母'
          return "-" + item.toLowerCase();
        }) +
        ":" +
        styles[prop] +
        ";";
    }
    str += "}";
    styleSheet.insertRule(str, styleSheet.cssRules.length); //插入样式到最后一个style标签中的最后面
  }

  window.onload = window.onresize = function () {
    // bodyScale();
  };
</script>